/******************************************************************************
//             INTEL CORPORATION PROPRIETARY INFORMATION
//  This software is supplied under the terms of a license agreement or
//  nondisclosure agreement with Intel Corporation and may not be copied
//  or disclosed except in accordance with the terms of that agreement.
//        Copyright (c) 2000-2001 Intel Corporation. All Rights Reserved.
//
//  Description:
//      Intel(R) JPEG library for X platform 
//
********************************************************************************/
#ifndef _IJDMARK_H
#define _IJDMARK_H

/******************************************************************************
// Name:            ijSeekStream
// Description:     Reposition the pointer in the current stream;
// Input Arguments:
//         nOffset: Indicates numbers of bytes to move the pointer.
//         pStream: Identifies IJBITTREAMSTATE data structure.
// Output Arguments:
//            NONE.
//                          
******************************************************************************/
#define  IJSEEKSTREAM(nOffet, pStream)                   \
{                                                        \
    pStream->nUsedBufBitsLen+=(nOffet<<3);               \
}

IJXRESULT ijSkipMarker(IJBITTREAMSTATE *pStream);

IJXRESULT ijReadMarker(int *pMarker,
                       IJBITTREAMSTATE *pStream);

IJXRESULT ijRead_COM(char *pSrcData, 
                     int  *pnLen, 
                     IJBITTREAMSTATE *pStream);

IJXRESULT ijRead_APP0Class(int *pnClass, 
                             int *pnLen,
                             IJBITTREAMSTATE *pStream);
IJXRESULT ijRead_APP0_JFIF(int *pnJFIFLen,
                             IJAPP0_JFIF *pApp0JFIF,
                             IJBITTREAMSTATE *pStream);
IJXRESULT ijRead_APP0_JFXX(int *pnJFIFLen,
                             IJAPP0_JFXX *pApp0JFXX,
                             IJBITTREAMSTATE *pStream);
IJXRESULT ijRead_APP0_IJXM(  int   nMarkerByteLength,
                             Ipp32u *pnJPEGCodeMode,
                             IIPIMAGESPEC *pImageSpec,
                             IWPWAVESPEC  *pWaveSpec,
                             IJMOTIONSPEC *pMotionSpec,
                             IJBITTREAMSTATE    *pStream);

IJXRESULT ijRead_APP14(IJBITTREAMSTATE *pStream);

IJXRESULT ijRead_DQT(Ipp32s *pDCTDequantTables,
                       int    nMaxQTables,
                       IJBITTREAMSTATE *pStream );

IJXRESULT ijRead_DHT( IppJPEGDeHuffTable *pDCHuffTable,
                      IppJPEGDeHuffTable *pACHuffTable,
                      int    nMaxTables,
                      IJBITTREAMSTATE *pStream);

IJXRESULT ijRead_DNL(int *pNumLines,
                     IJBITTREAMSTATE *pStream);

IJXRESULT ijRead_DRI(int *pRstInterval, 
                       IJBITTREAMSTATE *pStream);

IJXRESULT ijRead_SOF( IJFRAMESPEC *pFrameSpec,
                        IJCOMPSPEC  *pComp,
                        IJBITTREAMSTATE *pStream );

IJXRESULT ijRead_SOS(IJSCANSPEC *pScanSpec,
                       IJCOMPSPEC *pComp,
                       IJBITTREAMSTATE *pStream);


IJXRESULT ijGetWaveStream(void **ppWaveStreamBuf,
                          int  *pnByteLength,
                          IJBITTREAMSTATE *pStream);

IJXRESULT ijGetTimeStamp(IJTIMESPEC     *pTimeSpec, 
                         IJBITTREAMSTATE *pStream);

#endif
/* EOF */
